package com.libinyn.base.pms.controller;

import com.libinyn.base.pms.entity.sys.SysUserEntity;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * Controller公共组件
 * @fileName: AbstractController.java
 * @author: bin.li01
 * @date: 2017/12/10 12:02 
 * @version: v1.0.0
 */
public abstract class AbstractController {
	protected Logger logger = LoggerFactory.getLogger(getClass());

	protected SysUserEntity getUser() {
		return (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
	}

	protected Long getUserId() {
		return getUser().getUserId();
	}
}
